package com.xxwy.ddu.cms.authonrize.entity;

import com.baomidou.mybatisplus.annotations.*;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import lombok.Builder;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author xxwy
 * @since 2018-08-13
 */
@Builder
@TableName("bs_user_roles")
public class UserRoles extends Model<UserRoles> {

    private static final long serialVersionUID = 1L;

    private Integer uId;

    private Integer rId;

    @TableId(value = "ur_id", type = IdType.AUTO)
    private Integer urId;

    @TableLogic
    @TableField(value = "delete_flag")
    private Integer deleteFlag;

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getuId() {
        return uId;
    }

    public void setuId(Integer uId) {
        this.uId = uId;
    }
    public Integer getrId() {
        return rId;
    }

    public void setrId(Integer rId) {
        this.rId = rId;
    }
    public Integer getUrId() {
        return urId;
    }

    public void setUrId(Integer urId) {
        this.urId = urId;
    }

    @Override
    protected Serializable pkVal() {
        return this.urId;
    }

    @Override
    public String toString() {
        return "UserRoles{" +
        "uId=" + uId +
        ", rId=" + rId +
        ", urId=" + urId +
        "}";
    }

    public UserRoles() {
    }

    public UserRoles(Integer uId, Integer rId, Integer urId, Integer deleteFlag) {
        this.uId = uId;
        this.rId = rId;
        this.urId = urId;
        this.deleteFlag = deleteFlag;
    }
}
